<?php

namespace App\Models\Factory;

use App\Models\AbsModelFactory;
use App\Models\Orm\User;
use App\Models\Orm\Users;
use Illuminate\Support\Facades\Log;

/**
 *
 *
 * @package App\Models\Factory
 */
class UsersFactory extends AbsModelFactory
{


    public static function getUser($start,$end)
    {
        if($start)
        {
            $users = Users::with('delivery')->where('registe_time','<=',$end)->where('registe_time','>=',$start)->get();

        }else{
            $users = Users::with('delivery')->where('registe_time','<',date('Y-m-d H:i:s',time()))->get();

        }
        return $users;
    }

}